package Items.Top01.Lease;

public class PassengerCar extends Car{
    public PassengerCar(String carNum,String brand,double rent,int seatNum,boolean state,String model){
        super(carNum,brand,rent,state,model,seatNum);
    }

    public PassengerCar(){}


    @Override
    public double countRent(int days){
        double price;
        price=getRent()*days;
        if (days>=3&&days<7){
            System.out.println("享受九折优惠");
            price*=0.9;
            return price;
        }else if (days>=7&&days<=30){
            System.out.println("享受八折优惠");
            price*=0.8;
            return price;
        }else  if (days>=30&&days<=150){
            System.out.println("享受七折优惠");
            price*=0.7;
            return price;
        }else if (days>=150){
            System.out.println("享受六折优惠");
            price*=0.6;
            return price;
        }
        return price;
    }

//    public void carModel(String model){
//        Manager manager=new Manager();
//        for (int i=0;i<manager.getPos();i++){
//            if (model.equals(getModel())){
//                if (manager.cars[i].isLease()){
//                    System.out.println(manager.cars[i]);
//                }
//            }
//        }
//    }
}
